# 生成protobuf文件
  gen:
	@chmod +x scripts/gen-proto.sh
	@./scripts/gen-proto.sh

  # 清理生成的文件
  clean:
	@find . -name "*.pb.go" -delete
	@echo "Cleaned generated files"

  # 运行测试
  test:
	@go mod tidy
	@go vet ./...
	@echo "Tests passed"

  # 发布新版本
  publish:
	@chmod +x scripts/publish.sh
	@read -p "Enter version (e.g., v1.0.1): " version; \
	./scripts/publish.sh $$version

  # 帮助信息
  help:
	@echo "Available targets:"
	@echo "  gen     - Generate protobuf files"
	@echo "  clean   - Clean generated files"
	@echo "  test    - Run tests and checks"
	@echo "  publish - Publish new version"